///////////////////////////////////////////////////////////////////////////////
// Project: Hoyo Client Game
//
// hy_battle_effect_data.cpp
// Created: 2013-7-30
// Author: Like Cheng
///////////////////////////////////////////////////////////////////////////////

#include "hy_battle_effect_data.h"

#include "hy_common_system/hy_common_func.h"

hy_tag_dis_hp::hy_tag_dis_hp()
{
	init();
}

hy_tag_dis_hp::~hy_tag_dis_hp()
{

}

Json::Value	hy_tag_dis_hp::get_tag_dis_hp_json()
{
	Json::Value jv;
	jv["cp"] = m_cur_pos;
	jv["t"] = m_type;
	jv["ch"] = m_cur_hp;
	jv["sh"] = m_surplus_hp;
	jv["cv"] = m_current_value;
	jv["sc"] = m_state_change;
	jv["d"] = m_dodge;
	return jv;
}
void hy_tag_dis_hp::init()
{
	m_cur_pos = 0;				
	m_type = hy_attack_type_null;
	m_cur_hp;					
	m_surplus_hp;				
	m_current_value;			
	m_state_change;				
	m_dodge = false;
}

hy_tag_skill_pro::hy_tag_skill_pro()
{
	m_cur_times = 0;
	m_round = 0;
	m_send_pos = 0;
	m_send_skill = 0;
	m_send_skill_effect = 0;
	m_cur_hp = 0;
	m_surplus_hp = 0;
	m_current_value = 0;
	m_tag_dis_hp_map.clear();
}

Json::Value	hy_tag_skill_pro::get_tag_skill_pro_json()
{
	Json::Value jv;
	jv["ct"] = m_cur_times;
	jv["r"] = m_round;
	jv["sp"] = m_send_pos;
	jv["ss"] = m_send_skill;
	jv["sse"] = m_send_skill_effect;
	jv["ch"] = m_cur_hp;
	jv["sh"] = m_surplus_hp;
	jv["cv"] = m_current_value;

	Json::Value ajv( Json::arrayValue );
	hy_tag_dis_hp_map::iterator it;
	for( it = m_tag_dis_hp_map.begin(); it != m_tag_dis_hp_map.end(); it++ )
	{
		ajv.append( it->second.get_tag_dis_hp_json() );
	}
	jv["tdhm"] = ajv;
	return jv;
}


hy_tag_exec_round::hy_tag_exec_round()
{
}
hy_tag_exec_round::~hy_tag_exec_round()
{
}